class City < ActiveRecord::Base
  self.table_name = "sharp_zones_cities"
  attr_protected
  has_many :directories
  has_many :categories, :through => :directories
end

class Directory < ActiveRecord::Base
  belongs_to :city
end

class Remove < ActiveRecord::Migration
  def up
    Directory.all.each do |directory|
      directory.update_attributes city_name: directory.city.name if directory.city
    end
    drop_table :provinces
  end

  def down
  end
end
